package com.download.web.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.download.backstage.entity.ThirdAccount;
import com.download.web.entity.SysSponsor;
import com.download.web.entity.SysThirdAccount;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @description:
 * @author: cmy
 * @create: 2019-02-28 14:16
 **/
public interface SysThirdAccountMapper extends BaseMapper<SysThirdAccount> {

    @Select("select t.*,i.value typeVal from sys_third_account t left join bus_dic_item i on t.type=i.id" +
            " limit ${pageIndex},${pageSize} ")
    List<ThirdAccount> thirdAccountsByPage(@Param("pageIndex") Integer pageIndex, @Param("pageSize")Integer pageSize);

    @Select("select count(1) from sys_third_account t")
    Integer thirdAccountsCount();

}
